<?php
/* @var $this ContentController */
/* @var $model Content */
/* @var $form bootstrap.widgets.TbActiveForm */
?>


<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'content-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

		<?php echo 'Page: ' ?>
		<?php echo $form->hiddenField($model,'pageId'); ?>
		<?php echo $model->page->name; ?>
	<?php echo $form->textFieldRow($model,'name',array('class'=>'span3','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'slug',array('class'=>'span3','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'tabOrder',array('class'=>'span3','maxlength'=>255)); ?>

	<?php echo $form->labelEx($model,'content'); ?>
	<?php $this->widget('ext.redactor.ImperaviRedactorWidget', array(
	    // You can either use it for model attribute
	    'model' => $model,
	    'attribute' => 'content',
	)); ?>
	<?php echo $form->error($model,'content'); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
